using System.Collections.ObjectModel;
using AvaloniaApplication1.Models;
using CommunityToolkit.Mvvm.ComponentModel;

namespace AvaloniaApplication1.ViewModels;

public sealed partial class DataGridPageViewModel : ViewModelBase
{
    [ObservableProperty]
    private ObservableCollection<CountryItemModel> _item;

    public DataGridPageViewModel()
    {
        Item = new ObservableCollection<CountryItemModel>();

        foreach (var item in Countries.All)
        {
            Item.Add(item);
        }
    }
}